<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <script type="text/javascript" src="__dotnar_lib_base_url__/js/lib/require.min.js"></script>
	<script type="text/javascript" src="__dotnar_lib_base_url__/js/lib/loader.js"></script>
    <script type="text/javascript" src="/js/require.config.js"></script>
    <script type="text/javascript">
    require(["core"], function() {
        require(["./js/pages/goods-details", "./js/pages/top"], function(argument) {
            window.removeLoader();
        });
    });
    </script>
    <link rel="stylesheet" type="text/css" href="css/default-beta.css" />
    <link rel="stylesheet" type="text/css" href="css/icon.css">
    <title></title>

</head>

<body>
    <div style="display:none;" id="jSouperApp" class="_pc">
        <xmp>
            {{#include "pages/default/top.html"}}
            <!-- nav-bar -->
            {{#include "./pages/default/nav-bar.html"}}


            <div class="goods-main">

                {{#> "goods-main-img","goods_detail"}}

                <div class="describe">
                    <div class="goods-title">
                        <p>{{goods_detail.goods_name}}</p>
                        <div class="mini-describe">
                            {{goods_detail.intro}}
                        </div>
                    </div>

                    <hr />

                    <div class="price-describe">
                        <div class="price">
                            <span class="title">价格:</span>
                            <span class="money">{{goods_detail.price_toFixed_2+"/"+goods_detail.unit}}</span>
                        </div>

                        <div class="freight">
                            <span class="title">运费:</span>
                            <span class="money">{{#Fixed goods_detail.express_price}}</span>
                            <!-- <span class="method">申通</span> -->
                        </div>
                        {{#if goods_detail.limit}}
                        <div>
                            <span class="title">限购</span>
                            <span class="money">{{(!goods_detail.limit||goods_detail.limit==window.Number.MAX_VALUE)?'不限制':goods_detail.limit}}</span>
                        </div>
                        {{/if}}
                        <div>
                            <span class="title">存货:</span>
                            <span class="money">{{goods_detail.num}}</span>
                        </div>
                    </div>


                    <hr />

                    <inputnumber min=0 max="{{goods_detail.num}}" value="1" bind-input="{{'$Cache.goods_details.buy_number'}}"></inputnumber>
                    <hr />

                    <div class="submit">

                        <div class="button">
                            <!-- <input type="button" value="直接购买" name="buy" class="buy" class="buy" /> -->
                            <!-- <a href="./cart-beta.html?goods_id={{goods_detail._id}}&&num={{$Cache.goods_details.buy_number}}&&rcid={{$Cache.recommender_id}}"> -->
                            {{#if goods_detail.num}}
                            <div>
                                <button event-click="{{'$Event.goods.add_to_cart'}}">添加购物车</button>
                            </div>
                            {{#else}}
                            <button class="add_cart" disabled style="background-color:red;display:block;margin-left:0;cursor:default">此商品暂时缺货</button>
                            {{/if}}
                            <a event-click="{{'$Event.goods.collect_toggle'}}" class="{{$Cache.goods_detail.is_collect&&'icon-star3'||'icon-star'}}">{{$Cache.goods_detail.is_collect&&'已收藏'||'点击收藏'}}</a>
                            <br/>
                            <br/>
                            <br/>
                            <div id="shareSNS">
                                <share share-init-key="{{goods_detail.goods_name}}" share-text="【{{goods_detail.goods_name}}】{{goods_detail.intro}}" share-detail="我觉得“{{goods_detail.goods_name}}”还不错，推荐大家一起用。" share-img="{{goods_detail.preview_img_url}}"></share>
                            </div>
                        </div>
                        <qrcode srt="{{$Cache.recommender_url}}" logo="{{bus_info.info.logo_url}}"></qrcode>

                    </div>
                </div>


            </div>


            <div class="evaluation">
                <div class="nav-bar">
                    <a href="#default/goods-evaluation">
                        <div class="list">商品详情</div>
                    </a>
                    <a href="#default/comments">
                        <div class="list">购买评论</div>
                    </a>
                </div>


                <div class="info">
                    {{#teleporter "info"}}
                </div>
            </div>
        </xmp>
        {{#include './pages/default/bottom.html'}}
    </div>

</body>

</html>
